<?php

class cntrlhelp implements viewController {

	private $area;
	private $side;
	private $dependencies = array("JavaScript" => array("help.js"), "CSS" => array("hideSidebar.css"));
	private $pageName = "PicBoard Help";
	
	public function __construct(user &$userObj){
	
		$this->side = new template('control.helpTopics');
		$this->area = new template('area.help');
		
		parse_str($_GET['act']);
		
		$page = isset($page) ? $page : "builder";
		
		switch($page){
		
			case "uploading":
				$this->renderHelp($page);
			break;
		
			case "groups":
				$this->renderHelp($page);
			break;
			
			case "sharing":
				$this->renderHelp($page);
			break;			
			
			case "privacy":
				$this->renderHelp($page);
			break;			
			
					
			default:
				$this->renderHelp($page);
			break;
		
		}
		
	}

	private function renderHelp($page){
		$this->area->replace("helpContent", "<var id=\"file_help_" . $page . "\"></var>");
	}

	public function getSide(){
		return $this->side;
	}
	
	public function getArea(){
		return $this->area;
	}
	
	public function getDependencies(){
		return $this->dependencies;
	}

	public function getPageName(){
		return $this->pageName;
	}
	
	public function getTools(){
		return "";
	}

}

?>